from myhomework.account.daos import *  
from myhomework.common.daos import *

def user_profile(func):
    def new_view(request,context={}):
        context.update({'auth_user':request.user})
        print 'ok!!!!'
        print request.user
        if(request.user):
            try:
                user_profile = UserDao.get_user_by_student_id(request.user.username)
                context.update({'user':user_profile})
            except:
                pass
        return func(request,context)
    return new_view





    